package com.patten.decorator;

/**
 * Created with IntelliJ IDEA.
 * User: Lv.Dongjie
 * Date: 2018/8/7
 * Time: 10:38
 * Description: Soy
 */
public class Soy extends CondimentDecorator {

    Beverage beverage;

    public Soy(Beverage beverage) {
        this.beverage = beverage;
    }

    @Override
    public String getDescription() {
        return beverage.getDescription().concat(",Soy");
    }

    @Override
    public double cost() {
        return 1+beverage.cost();
    }
}
